#pragma once

#pragma unmanaged

#include <BWSAL\Base.h>

#pragma managed

#include "..\BWAPI\Unit.h"
#include "..\BWTA\BaseLocation.h"

using namespace System::Collections::Generic;
using namespace BroodWar::Api;

namespace BroodWar
{
	namespace Addon
	{
		public ref class Base
		{
		internal:
			BWSAL::Base* instance;

			Base(BWSAL::Base* base);
		public:
			property Terrain::BaseLocation^ BaseLocation { Terrain::BaseLocation^ get(); }
			property Unit^ ResourceDepot { Unit^ get(); }
			property Unit^ Refinery { Unit^ get(); }
			property HashSet<Unit^>^ Minerals { HashSet<Unit^>^ get(); }
			property HashSet<Unit^>^ Geysers { HashSet<Unit^>^ get(); }
			void SetPause(bool paused);
			property bool IsPaused { bool get(); }
			property bool IsReady { bool get(); }
			property bool IsActive { bool get(); }
			void Update();
			void OnUnitDestroy(Unit^ unit);

			virtual int GetHashCode() override;
			virtual bool Equals(Object^ o) override;
			bool Equals(Base^ other);

			static bool operator == (Base^ first, Base^ second);
			static bool operator != (Base^ first, Base^ second);
		};

		Base^ ConvertBase(BWSAL::Base* base);
		BWSAL::Base* ConvertBase(Base^ base);
	}
}
